import Vue from 'vue';
import store from './store'
import formRules from '@/utils/formRules';
import setting from '@/setting';
import divider from '@/components/divider'
// import 'windi.css'

import {
  router,
  RouterMount
} from './router/index.js' //路径换成自己的
Vue.use(router)
import App from './App';



// import '@/style/vant/index.css';

import uView from "uview-ui";
Vue.use(uView);
// import '@/style/index.scss';


Vue.component('divider', divider)
Vue.config.productionTip = false;
Vue.prototype.$store = store
Vue.prototype.$rules = formRules;

Vue.prototype.$baseUrl = setting.baseUrl;
Vue.prototype.$uploadUrl = setting.baseUrl + 'api/common/file/upload';

Vue.prototype.$showToast = (title, icon = 'none', otherOptions) => {
  uni.showToast({
    title,
    icon,
    ...otherOptions
  });
};
// Vue.use(Router)
App.mpType = 'app';
// Vue.use(uView);

// Vue.use(Vant);

const app = new Vue({
  store,
  ...App
});
//v1.3.5起 H5端 你应该去除原有的app.$mount();使用路由自带的渲染方式
// #ifdef H5
RouterMount(app, router, '#app')
// #endif

// #ifndef H5
app.$mount(); //为了兼容小程序及app端必须这样写才有效果
// #endif
